package com.lib.controller.agent.api;

import com.lib.application.RentalAgentService;
import com.lib.dto.RentalAgentApplyDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by duqingxiang on 17/5/23.
 */
@RestController
@RequestMapping("/api/agent/apply")
public class RentalAgentApplyApiController {

    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    RentalAgentService rentalAgentService;

    @RequestMapping("/submit")
    public String apply(@ModelAttribute RentalAgentApplyDTO applyDTO){
        logger.info("submit info {}",applyDTO);
        int res = rentalAgentService.submitAgentApply(applyDTO);
        return res+"";
    }



}
